package com.cangsan.erhai.config;

import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WxPayAutoCertificateConfig {
    @Autowired
    private WechatConfig wxPayConfig;

    /**
     * 初始化商户配置
     * @return
     */
//    @Bean
//    public RSAAutoCertificateConfig rsaAutoCertificateConfig() {
//        RSAAutoCertificateConfig config = new RSAAutoCertificateConfig.Builder()
//                .merchantId(wxPayConfig.getMerchantId())
//                .privateKey(wxPayConfig.getPrivateKey())
//                .merchantSerialNumber(wxPayConfig.getMerchantSerialNumber())
//                .apiV3Key(wxPayConfig.getApiV3Key())
//                .build();
//
//        return config;
//    }
}
